<%@page import="com.hongkou.tvstation.image.data.TImage"%>
<%@page import="com.hongkou.tvstation.image.vo.ImageTypeVO"%>
<%@page import="com.hongkou.tvstation.image.vo.ImageVO"%>
<%@page import="com.hongkou.tvstation.news.data.TNews"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="com.hongkou.tvstation.common.CodeCst"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="com.hongkou.tvstation.common.codetable.CodeTableDao"%>
<%@page import="com.hongkou.tvstation.common.utils.StringUtils"%>
<%@ taglib uri="/WEB-INF/hongkou.tld" prefix="page"%>
<tr>
	<td class="td_heng">
		图片列表&nbsp;
	</td>
	<td class="td_heng">
		&nbsp;
	</td>
</tr>
<tr>
	<td colspan="2">
		<table width="100%" id="line">
			<tr>
				<th>
					选择
				</th>
				<th>
					图片名称
				</th>
				<th>
					图片类型
				</th>
				<th>
					照片组
				</th>
				<th>
					拍摄时间
				</th>
			</tr>
			<%
				List<TImage> imageList = (List<TImage>) request
						.getAttribute("imageList");
				if (imageList != null) {
					for (TImage imageVO : imageList) {
			%>
			<tr>
				<td width="5%" align="center">
					<input type="checkbox" name="imageId"
						value="<%=imageVO.getImageId()%>" onchange="entryImageInfo()" />
				</td>
				<td width="20%" align="right">
					<%
						if (imageVO.getType() != null
										&& imageVO.getType().intValue() == CodeCst.IMAGE_TYPE__IMAGE_FILE) {
					%>
					<a target="_blank" onmouseout="hiddenPic();"
						onmousemove="showPic('<%="http://" + request.getServerName()
								+ ":" + request.getServerPort()
								+ request.getContextPath() + "/"
								+ CodeCst.SYSTEM_CONFIG_IMAGE_PATH
								+ imageVO.getFilePath().replace('\\', '/')%>');"
						href="imageManagement.do?actionType=enterFolder&imageId=<%=imageVO.getImageId()%>"><%=imageVO.getImageName()%>
					</a>
					<%
						} else {
					%>
					<a target="_blank" onmouseout="hiddenPic();"
						onmousemove="showPic('<%="http://" + request.getServerName()
								+ ":" + request.getServerPort()
								+ request.getContextPath() + "/"
								+ CodeCst.SYSTEM_CONFIG_IMAGE_PATH
								+ imageVO.getFilePath().replace('\\', '/')%>');"
						href="imageManagement.do?actionType=displayImage&imageId=<%=imageVO.getImageId()%>"><%=imageVO.getImageName()%></a>
					<%
						}
					%>
				</td>
				<td width="20%" align="right">
					<a target="_blank" onmouseout="hiddenPic();"
						onmousemove="showPic('<%="http://" + request.getServerName()
								+ ":" + request.getServerPort()
								+ request.getContextPath() + "/"
								+ CodeCst.SYSTEM_CONFIG_IMAGE_PATH
								+ imageVO.getFilePath().replace('\\', '/')%>');"
						href="imageManagement.do?actionType=displayImage&imageId=<%=imageVO.getImageId()%>">
						<page:codeTable tableName="T_IMAGE_CATEGORY" value="<%=imageVO.getCategoryId() %>" name="displayCategory" io="out" />
						</a>
					<div id="Layer1"
						style="display: none; position: absolute; z-index: 1;">
						</div>
				</td>
				<td width="20%" align="right">
				<page:codeTable tableName="T_IMAGE_GROUP" value="<%=imageVO.getImageGroup() %>" name="imageGroupDisplay" io="out" />
				</td>
				<td width="20%" align="right">
				<%if(imageVO.getShootingTime() !=null){ %>
					<%=new SimpleDateFormat("yyyy-MM-dd").format(imageVO.getShootingTime()) %>
					<%} %>
				</td>
			</tr>
			<%
				}
				}
			%>
		</table>
	</td>
</tr>
<tr>
	<td colspan="2" align="right">&lt;
		<page:page url="queryImage.do?1=1" pagesize="${pageVO.pageSize}"
			totalRecords="${pageVO.totalRecords}" pageNum="${pageVO.pageNum}" />
	</td>
	<td colspan="2">
		&nbsp;
	</td>
</tr>

<%
    response.setCharacterEncoding("UTF-8");
    request.setCharacterEncoding("UTF-8");
%>
<script>
<%
if(request.getAttribute("attribute_exception")!=null){
	%>
	alert("<%=request.getAttribute("attribute_exception")%>");
	<%
}
if(request.getAttribute("action_result")!=null){
%>
	alert("<%=request.getAttribute("action_result")%>");
<%}%>
function deleteImage(){
	form1.action="deleteImage.do";
	form1.submit();
}
</script>
